<template>
  <transition name="el-zoom-in-center">
    <div class="JNPF-preview-main">
      <div class="JNPF-common-page-header">
        <el-page-header @back="goBack" :content="!dataForm.id ? '新建':'详情'"/>
        <div class="options">
          <el-button @click="goBack" type="primary"> 取 消</el-button>
        </div>
      </div>
      <el-row :gutter="60" class=" main" :style="{margin: '0 auto',width: '100%'}">
        <el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small"
                 label-position="top">
          <template v-if="!loading">
            <!-- 具体表单 -->
            <el-col :span="24">
              <jnpf-form-tip-item>
                <JnpfText
                  :textStyle='{"color":"#1684FC","font-weight":"bold","text-decoration":"none","font-size":24,"line-height":32,"font-style":"normal","text-align":"center"}'
                  content="项目信息">
                </JnpfText>
              </jnpf-form-tip-item>
            </el-col>
            <el-col :span="24">
              <el-steps :space="200" :active="getEnCode(dataForm.createProjectStatus)"
                        finish-status="success" align-center>
                <el-step v-for="(item, index) in this.createProjectStatusOptions"
                         :key="item.index"
                         :title="item.fullName"></el-step>
              </el-steps>
            </el-col>
            <el-col :span="24">
              <jnpf-form-tip-item>
                <JnpfGroupTitle
                  content="项目立项信息" contentPosition="left">
                </JnpfGroupTitle>
              </jnpf-form-tip-item>
            </el-col>
            <el-col :span="4">
              <el-row :gutter="15">
                <el-col :span="24">
                  <jnpf-form-tip-item>
                    <JnpfText
                      :textStyle='{"color":"#000000","font-weight":"normal","text-decoration":"none","font-size":12,"line-height":32,"font-style":"normal","text-align":"left"}'>
                    </JnpfText>
                  </jnpf-form-tip-item>
                </el-col>
              </el-row>
            </el-col>
            <el-col :span="16">
              <el-row :gutter="15">
                <el-col :span="12">
                  <jnpf-form-tip-item
                    label="企业名称" prop="enterpriseName">
                    <JnpfInput v-model="dataForm.enterpriseName" @change="changeData('enterpriseName',-1)"
                               placeholder="请输入" readonly clearable :style='{"width":"100%"}'>
                    </JnpfInput>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="12">
                  <jnpf-form-tip-item
                    label="企业信用代码" prop="enterpriseCreditCode">
                    <JnpfInput v-model="dataForm.enterpriseCreditCode" @change="changeData('enterpriseCreditCode',-1)"
                               placeholder="请输入" readonly clearable :style='{"width":"100%"}'>
                    </JnpfInput>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="24">
                  <jnpf-form-tip-item
                    label="企业简介" prop="enterpriseIntroduce">
                    <JnpfTextarea v-model="dataForm.enterpriseIntroduce" @change="changeData('enterpriseIntroduce',-1)"
                                  placeholder="请输入" :style='{"width":"100%"}' true type="textarea"
                                  :autosize='{"minRows":4,"maxRows":4}' readonly>
                    </JnpfTextarea>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="24">
                  <jnpf-form-tip-item
                    label="项目名称" prop="projectName">
                    <JnpfInput v-model="dataForm.projectName" @change="changeData('projectName',-1)"
                               placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
                    </JnpfInput>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="12">
                  <jnpf-form-tip-item
                    label="项目负责人" prop="projectLeader">
                    <JnpfInput v-model="dataForm.projectLeader" @change="changeData('projectLeader',-1)"
                               placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
                    </JnpfInput>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="12">
                  <jnpf-form-tip-item
                    label="联系电话" prop="phone">
                    <JnpfInput v-model="dataForm.phone" @change="changeData('phone',-1)"
                               placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
                    </JnpfInput>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="12">
                  <jnpf-form-tip-item
                    label="所属行业" prop="industry">
                    <JnpfInput v-model="dataForm.industry" @change="changeData('industry',-1)"
                               placeholder="请输入" readonly clearable :style='{"width":"100%"}' readonly>
                    </JnpfInput>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="12">
                  <jnpf-form-tip-item
                    label="细分行业" prop="specificIndustry">
                    <JnpfInput v-model="dataForm.specificIndustry" @change="changeData('specificIndustry',-1)"
                               placeholder="请输入" readonly clearable :style='{"width":"100%"}' readonly>
                    </JnpfInput>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="12">
                  <jnpf-form-tip-item
                    label="区县" prop="county">
                    <JnpfSelect v-model="dataForm.county" @change="changeData('county',-1)"
                                placeholder="请选择" clearable :style='{"width":"100%"}' :options="countyOptions"
                                :props="countyProps" readonly disabled>
                    </JnpfSelect>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="12">
                  <jnpf-form-tip-item
                    label="创建项目状态" prop="createProjectStatus">
                    <JnpfSelect v-model="dataForm.createProjectStatus" @change="changeData('createProjectStatus',-1)"
                                placeholder="请选择" clearable :style='{"width":"100%"}'
                                :options="createProjectStatusOptions"
                                :props="createProjectStatusProps" disabled>
                    </JnpfSelect>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="12">
                  <jnpf-form-tip-item
                    label="数字化自测评等级" prop="digitalLelfassessmentLevel">
                    <JnpfInput v-model="dataForm.digitalLelfassessmentLevel"
                               @change="changeData('digitalLelfassessmentLevel',-1)"
                               placeholder="请输入" readonly clearable :style='{"width":"100%"}'>
                    </JnpfInput>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="12">
                  <jnpf-form-tip-item
                    label="评测分数" prop="digitalScore">
                    <JnpfInputNumber v-model="dataForm.digitalScore" @change="changeData('digitalScore',-1)"
                                     placeholder="请输入" :style='{"width":"100%"}' readonly disabled
                                     :min="0" controls-position="right" :precision="2" :controls="false">
                    </JnpfInputNumber>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="24" :style='{"padding":"0px"}'>
                  <el-col :span="12">
                    <jnpf-form-tip-item label="实施改造后预期数字化水平等级" prop="aftertransformationDigitalLevel">
                      <JnpfRadio v-model="dataForm.aftertransformationDigitalLevel"
                                 @change="changeData('aftertransformationDigitalLevel',-1)"
                                 optionType="default" direction="horizontal" size="small"
                                 :options="aftertransformationDigitalLevelOptions"
                                 :props="aftertransformationDigitalLevelProps" readonly disabled>
                      </JnpfRadio>
                    </jnpf-form-tip-item>
                  </el-col>
                  <el-col :span="12">
                    <jnpf-form-tip-item
                      label="预评测分数" prop="aftertransformationScore">
                      <JnpfInputNumber v-model="dataForm.aftertransformationScore"
                                       @change="changeData('aftertransformationScore',-1)"
                                       placeholder="请输入" :precision="2" :min="0" :controls="false"
                                       :style='{ "width": "100%" }' readonly disabled>
                      </JnpfInputNumber>
                    </jnpf-form-tip-item>
                  </el-col>
                </el-col>
                <el-col :span="24">
                  <jnpf-form-tip-item
                    label="个性需求" prop="individualNeeds">
                    <JnpfEditor v-model="dataForm.individualNeeds" @change="changeData('individualNeeds',-1)"
                                placeholder="请输入" :style='{"width":"100%"}' readonly disabled>
                    </JnpfEditor>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="12">
                  <jnpf-form-tip-item
                    label="服务商名称" prop="serverName">
                    <JnpfInput v-model="dataForm.serverName" @change="changeData('serverName',-1)"
                               placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
                    </JnpfInput>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="12">
                  <jnpf-form-tip-item
                    label="服务商统一社会信用代码" prop="serverCreditCode">
                    <JnpfInput v-model="dataForm.serverCreditCode" @change="changeData('serverCreditCode',-1)"
                               placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
                    </JnpfInput>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="12">
                  <jnpf-form-tip-item
                    label="项目类别" prop="projectType">
                    <JnpfInput v-model="dataForm.projectType" @change="changeData('projectType',-1)"
                               placeholder="请输入" readonly clearable :style='{"width":"100%"}'>
                    </JnpfInput>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="12">
                  <jnpf-form-tip-item
                    label="预算类别" prop="budgetType">
                    <JnpfInput v-model="dataForm.budgetType" @change="changeData('budgetType',-1)"
                               placeholder="请输入" readonly clearable :style='{"width":"100%"}'>
                    </JnpfInput>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="24">
                  <jnpf-form-tip-item
                    label="项目内容" prop="projectContent">
                    <JnpfTextarea v-model="dataForm.projectContent" @change="changeData('projectContent',-1)"
                                  placeholder="请输入" :style='{"width":"100%"}' true type="textarea"
                                  :autosize='{"minRows":4,"maxRows":4}' readonly>
                    </JnpfTextarea>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="24">
                  <jnpf-form-tip-item
                    label="数字化现状" tipLabel="（简述企业在“数字化基础、数字化经营、数字化管理、数字化成效”方面现在的情况）" prop="digitalCurrentState">
                    <JnpfEditor v-model="dataForm.digitalCurrentState" @change="changeData('digitalCurrentState',-1)"
                                placeholder="请输入" :style='{"width":"100%"}' readonly disabled>
                    </JnpfEditor>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="24">
                  <jnpf-form-tip-item
                    label="预期成效" tipLabel="围绕提质、增效、降本、减存、绿色、安全等方面对改造预期成效做描述）" prop="expectedResults">
                    <JnpfEditor v-model="dataForm.expectedResults" @change="changeData('expectedResults',-1)"
                                placeholder="请输入" :style='{"width":"100%"}' readonly disabled>
                    </JnpfEditor>
                  </jnpf-form-tip-item>
                </el-col>

                <el-col :span="12">
                  <jnpf-form-tip-item
                    label="开始日期" prop="startDate">
                    <JnpfDatePicker v-model="dataForm.startDate" @change="changeData('startDate',-1)"
                                    :startTime="dateTime(false,1,1,'','')" :endTime="dateTime(false,1,1,'','')"
                                    placeholder="请选择" clearable :style='{"width":"100%"}' type="date"
                                    format="yyyy-MM-dd" readonly>
                    </JnpfDatePicker>
                  </jnpf-form-tip-item>
                </el-col>

                <el-col :span="12">
                  <jnpf-form-tip-item
                    label="结束日期" prop="endDate">
                    <JnpfDatePicker v-model="dataForm.endDate" @change="changeData('endDate',-1)"
                                    :startTime="dateTime(true,2,1,'',dataForm.startDate)"
                                    :endTime="dateTime(false,1,1,'','')" placeholder="请选择" clearable
                                    :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" readonly>
                    </JnpfDatePicker>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="24">
                  <jnpf-form-tip-item label-width="0">
                    <div class="JNPF-common-title">
                      <h2>数字化改造产品或服务预算</h2>
                    </div>
                    <el-table :data="dataForm.fz_project_library_digital_budgetList" size='mini'>
                      <el-table-column type="index" width="50" label="序号" align="center"/>
                      <el-table-column
                        label="预算名称" prop="budgetName">
                        <template slot="header" v-if="true">
                          <span class="required-sign">*</span>预算名称
                        </template>
                        <template slot-scope="scope">
                          <JnpfInput v-model="scope.row.budgetName" readonly
                                     @change="changeData('fz_project_library_digital_budget-budgetName',scope.$index)"
                                     placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
                          </JnpfInput>
                        </template>
                      </el-table-column>
                      <el-table-column
                        label="预算金额(万元)" prop="budgetMoney">
                        <template slot="header" v-if="true">
                          <span class="required-sign">*</span>预算金额(万元)
                        </template>
                        <template slot-scope="scope">
                          <JnpfInputNumber v-model="scope.row.budgetMoney" readonly :controls="false"
                                           @change="changeData('fz_project_library_digital_budget-budgetMoney',scope.$index)"
                                           placeholder="请输入" :precision="2" addonAfter="万元" disabled>
                          </JnpfInputNumber>
                        </template>
                      </el-table-column>
                    </el-table>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="24">
                  <jnpf-form-tip-item label-width="0">
                    <div class="JNPF-common-title">
                      <h2>其他支出预算</h2>
                    </div>
                    <el-table :data="dataForm.fz_project_library_other_digital_budgetList" size='mini'>
                      <el-table-column type="index" width="50" label="序号" align="center"/>
                      <el-table-column readonly label="预算小类（除了以上1-4项外的支出项，按实际增加行数）" prop="budgetName">
                        <template slot="header" v-if="false">
                          <span class="required-sign">*</span>预算小类（除了以上1-4项外的支出项，按实际增加行数）
                        </template>
                        <template slot-scope="scope">
                          <JnpfInput v-model="scope.row.budgetName" readonly
                                     @change="changeData('fz_project_library_other_digital_budget-budgetName',scope.$index)"
                                     placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
                          </JnpfInput>
                        </template>
                      </el-table-column>
                      <el-table-column
                        label="预算金额(万元)" prop="budgetMoney">
                        <template slot="header" v-if="false">
                          <span class="required-sign">*</span>预算金额(万元)
                        </template>
                        <template slot-scope="scope">
                          <JnpfInputNumber v-model="scope.row.budgetMoney" readonly disabled :controls="false"
                                           @change="changeData('fz_project_library_other_digital_budget-budgetMoney',scope.$index)"
                                           placeholder="请输入" :precision="2" addonAfter="万元">
                          </JnpfInputNumber>
                        </template>
                      </el-table-column>
                    </el-table>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="12">
                  <jnpf-form-tip-item
                    label="数字化改造产品或服务预算合计(万元)" prop="digitalBudgetTotal">
                    <JnpfInput v-model="dataForm.digitalBudgetTotal" @change="changeData('digitalBudgetTotal',-1)"
                               placeholder="请输入" addonAfter="万元" readonly clearable :style='{"width":"100%"}' readonly>
                    </JnpfInput>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="12">
                  <jnpf-form-tip-item
                    label="其他支出项预算合计(万元)" prop="otherDigitalTotal">
                    <JnpfInput v-model="dataForm.otherDigitalTotal" @change="changeData('otherDigitalTotal',-1)"
                               placeholder="请输入" addonAfter="万元" readonly clearable :style='{"width":"100%"}'>
                    </JnpfInput>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="12">
                  <jnpf-form-tip-item
                    label="总预算（万元）" prop="generalBudget">
                    <JnpfInput v-model="dataForm.generalBudget" @change="changeData('generalBudget',-1)"
                               placeholder="请输入" addonAfter="万元" readonly clearable :style='{"width":"100%"}'>
                    </JnpfInput>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="12">
                  <jnpf-form-tip-item
                    label="拟支持数字化改造资金（万元）" prop="digitalRenovationFunds">
                    <JnpfInputNumber v-model="dataForm.digitalRenovationFunds" readonly :controls="false"
                                     @change="changeData('digitalRenovationFunds',-1)" disabled
                                     placeholder="请输入" :precision="2" addonAfter="万元" :min="0"
                                     controls-position="right">
                    </JnpfInputNumber>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="12">
                  <jnpf-form-tip-item
                    label="是否有贷款需求" prop="isLoan">
                    <JnpfRadio v-model="dataForm.isLoan" @change="changeData('isLoan',-1)"
                               optionType="default" direction="horizontal" size="small" :options="isLoanOptions"
                               :props="isLoanProps" readonly disabled>
                    </JnpfRadio>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="12">
                  <jnpf-form-tip-item
                    label="意向贷款金额(万元)" prop="loanMoney">
                    <JnpfInputNumber v-model="dataForm.loanMoney" @change="changeData('loanMoney',-1)" :controls="false"
                                     placeholder="请输入" addonAfter="万元" readonly :min="0" controls-position="right"
                                     disabled>
                    </JnpfInputNumber>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="24">
                  <jnpf-form-tip-item
                    label="真实性承诺" prop="authenticityCommitment">
                    <JnpfEditor v-model="dataForm.authenticityCommitment"
                                @change="changeData('authenticityCommitment',-1)"
                                placeholder="请输入" :style='{"width":"100%"}' readonly disabled>
                    </JnpfEditor>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="24">
                  <jnpf-form-tip-item
                    label="数字化改造产品或服务预算明细附件" prop="digitalBudgetFiles">
                    <JnpfUploadFile v-model="dataForm.digitalBudgetFiles" @change="changeData('digitalBudgetFiles',-1)"
                                    :fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0"
                                    buttonText="点击上传" readonly disabled>
                    </JnpfUploadFile>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="24">
                  <jnpf-form-tip-item
                    label="其他支出项预算明细附件" prop="otherBudgetFiles">
                    <JnpfUploadFile v-model="dataForm.otherBudgetFiles" @change="changeData('otherBudgetFiles',-1)"
                                    :fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0"
                                    buttonText="点击上传" readonly disabled>
                    </JnpfUploadFile>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="24">
                  <jnpf-form-tip-item
                    label="数字化改造项目服务合同" prop="digitalServiceContractFiles">
                    <JnpfUploadFile v-model="dataForm.digitalServiceContractFiles"
                                    @change="changeData('digitalServiceContractFiles',-1)"
                                    :fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0"
                                    buttonText="点击上传" readonly disabled>
                    </JnpfUploadFile>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="24">
                  <jnpf-form-tip-item
                    label="数字化改造项目方案" prop="digitalProjectPlanFiles">
                    <JnpfUploadFile v-model="dataForm.digitalProjectPlanFiles"
                                    @change="changeData('digitalProjectPlanFiles',-1)"
                                    :fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0"
                                    buttonText="点击上传" readonly disabled>
                    </JnpfUploadFile>
                  </jnpf-form-tip-item>
                </el-col>
                <el-col :span="24">
                  <jnpf-form-tip-item
                    label="福州市中小企业数字化转型试点被改造企业项目表 " prop="recordFormFiles">
                    <JnpfUploadFile v-model="dataForm.recordFormFiles" @change="changeData('recordFormFiles',-1)"
                                    tipText="(请被改造企业导出项目表并打印纸质版，在封面和真实性承诺相关位置处盖章，将盖章版项目表扫描成电子档上传平台，请上传pdf)"
                                    :fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0"
                                    buttonText="点击上传" readonly disabled>
                    </JnpfUploadFile>
                  </jnpf-form-tip-item>
                </el-col>
              </el-row>
            </el-col>
            <el-col :span="4">
              <el-row :gutter="15">
                <el-col :span="24">
                  <jnpf-form-tip-item>
                    <JnpfText
                      :textStyle='{"color":"#000000","font-weight":"normal","text-decoration":"none","font-size":12,"line-height":32,"font-style":"normal","text-align":"left"}'>
                    </JnpfText>
                  </jnpf-form-tip-item>
                </el-col>
              </el-row>
            </el-col>
            <el-col :span="24">
              <jnpf-form-tip-item>
                <JnpfGroupTitle
                  content="季度进度填报" contentPosition="left">
                </JnpfGroupTitle>
              </jnpf-form-tip-item>
            </el-col>
            <el-col :span="4">
              <el-row :gutter="15">
                <el-col :span="24">
                  <jnpf-form-tip-item>
                    <JnpfText
                      :textStyle='{"color":"#000000","font-weight":"normal","text-decoration":"none","font-size":12,"line-height":32,"font-style":"normal","text-align":"left"}'>
                    </JnpfText>
                  </jnpf-form-tip-item>
                </el-col>
              </el-row>
            </el-col>
            <el-col :span="16">
              <el-row :gutter="15">
                <el-col :span="24">
                  <jnpf-form-tip-item label-width="0">
                    <el-table :data="dataForm.fz_project_library_quarterly_progressList" size='mini'>
                      <el-table-column type="index" width="50" label="序号" align="center"/>
                      <el-table-column
                        label="项目当季完成投资金额 （万元）" prop="projectInseasonInvestment">
                        <template slot="header" v-if="false">
                          <span class="required-sign">*</span>项目当季完成投资金额 （万元）
                        </template>
                        <template slot-scope="scope">
                          <JnpfInputNumber v-model="scope.row.projectInseasonInvestment" readonly disabled
                                           @change="changeData('fz_project_library_quarterly_progress-projectInseasonInvestment',scope.$index)"
                                           placeholder="请输入" clearable :style='{"width":"100%"}' addonAfter="万元"
                                           :precision="2" :controls="false">
                          </JnpfInputNumber>
                        </template>
                      </el-table-column>
                      <el-table-column
                        label="项目累计完成投资金额 （万元）" prop="projectTotalInvestment">
                        <template slot="header" v-if="false">
                          <span class="required-sign">*</span>项目累计完成投资金额 （万元）
                        </template>
                        <template slot-scope="scope">
                          <JnpfInputNumber v-model="scope.row.projectTotalInvestment" readonly disabled
                                           @change="changeData('fz_project_library_quarterly_progress-projectTotalInvestment',scope.$index)"
                                           placeholder="请输入" clearable :style='{"width":"100%"}' addonAfter="万元"
                                           :precision="2" :controls="false">
                          </JnpfInputNumber>
                        </template>
                      </el-table-column>
                      <el-table-column
                        label="项目形象进度" prop="projectImageProgress">
                        <template slot="header" v-if="false">
                          <span class="required-sign">*</span>项目形象进度
                        </template>
                        <template slot-scope="scope">
                          <JnpfTextarea v-model="scope.row.projectImageProgress" readonly
                                        @change="changeData('fz_project_library_quarterly_progress-projectImageProgress',scope.$index)"
                                        placeholder="请输入" :style='{"width":"100%"}' true type="textarea"
                                        :autosize='{"minRows":4,"maxRows":4}'>
                          </JnpfTextarea>
                        </template>
                      </el-table-column>
                      <el-table-column label="操作" width="50">
                        <template slot-scope="scope">
                          <el-button size="mini" type="text"
                                     @click="goProgressDetail(scope.row)">查看
                          </el-button>
                        </template>
                      </el-table-column>
                    </el-table>
                  </jnpf-form-tip-item>
                </el-col>
              </el-row>
            </el-col>
            <el-col :span="4">
              <el-row :gutter="15">
                <el-col :span="24">
                  <jnpf-form-tip-item>
                    <JnpfText
                      :textStyle='{"color":"#000000","font-weight":"normal","text-decoration":"none","font-size":12,"line-height":32,"font-style":"normal","text-align":"left"}'>
                    </JnpfText>
                  </jnpf-form-tip-item>
                </el-col>
              </el-row>
            </el-col>
            <!-- 表单结束 -->
          </template>
        </el-form>
        <SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm"
                      ref="selectDialog" @select="addForSelect" @close="selectDialogVisible=false"/>
        <ProgressForm v-if="progressformVisible" ref="ProgressForm"></ProgressForm>
      </el-row>
    </div>
  </transition>
</template>


<script>
import request from '@/utils/request'
import {mapGetters} from "vuex";
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
import {getDefaultCurrentValueUserId} from '@/api/permission/user'
import {getDefaultCurrentValueDepartmentId} from '@/api/permission/organize'
import ProgressForm from './ProgressDetail'
import {
  getDateDay,
  getLaterData,
  getBeforeData,
  getBeforeTime,
  getLaterTime
} from '@/components/Generator/utils/index.js'
import {thousandsFormat} from "@/components/Generator/utils/index"

export default {
  components: {
    ProgressForm
  },
  props: [],
  data() {
    return {
      progressformVisible: false,
      dataFormSubmitType: 0,
      continueBtnLoading: false,
      index: 0,
      prevDis: false,
      nextDis: false,
      allList: [],
      visible: false,
      loading: false,
      btnLoading: false,
      formRef: 'formRef',
      setting: {},
      eventType: '',
      userBoxVisible: false,
      selectDialogVisible: false,
      currTableConf: {},
      dataValueAll: {},
      addTableConf: {
        fz_project_library_digital_budgetList: {
          "popupType": "dialog",
          "hasPage": true,
          "popupTitle": "选择数据",
          "pageSize": 20,
          "columnOptions": [],
          "interfaceId": "",
          "interfaceName": "",
          "relationOptions": [],
          "templateJson": [],
          "popupWidth": "800px"
        },
        fz_project_library_other_digital_budgetList: {
          "popupType": "dialog",
          "hasPage": true,
          "popupTitle": "选择数据",
          "pageSize": 20,
          "columnOptions": [],
          "interfaceId": "",
          "interfaceName": "",
          "relationOptions": [],
          "templateJson": [],
          "popupWidth": "800px"
        },
        fz_project_library_quarterly_progressList: {
          "popupType": "dialog",
          "hasPage": true,
          "popupTitle": "选择数据",
          "pageSize": 20,
          "columnOptions": [],
          "interfaceId": "",
          "interfaceName": "",
          "relationOptions": [],
          "templateJson": [],
          "popupWidth": "800px"
        },
        fz_project_library_flow_taskList: {
          "popupType": "dialog",
          "hasPage": true,
          "popupTitle": "选择数据",
          "pageSize": 20,
          "columnOptions": [],
          "interfaceId": "",
          "interfaceName": "",
          "relationOptions": [],
          "templateJson": [],
          "popupWidth": "800px"
        },
      },
      //可选范围默认值
      ableAll: {},
      tableRows: {
        fz_project_library_digital_budgetList: {
          budgetName: '',
          budgetNameOptions: [],
          budgetMoney: undefined,
          budgetMoneyOptions: [],
          enabledmark: undefined
        },
        fz_project_library_other_digital_budgetList: {
          budgetName: '',
          budgetNameOptions: [],
          budgetMoney: undefined,
          budgetMoneyOptions: [],
          enabledmark: undefined
        },
        fz_project_library_quarterly_progressList: {
          projectInseasonInvestment: '',
          projectInseasonInvestmentOptions: [],
          projectTotalInvestment: '',
          projectTotalInvestmentOptions: [],
          projectImageProgress: '',
          projectImageProgressOptions: [],
          enabledmark: undefined
        },
        fz_project_library_flow_taskList: {
          status: '',
          statusOptions: [],
          enabledmark: undefined
        },
      },
      Vmodel: "",
      currVmodel: "",
      dataForm: {
        createProjectStatus: undefined,
        enterpriseName: undefined,
        enterpriseCreditCode: undefined,
        enterpriseIntroduce: undefined,
        projectName: undefined,
        projectLeader: undefined,
        phone: undefined,
        industry: undefined,
        specificIndustry: undefined,
        county: undefined,
        digitalLelfassessmentLevel: undefined,
        digitalScore: undefined,
        aftertransformationDigitalLevel: undefined,
        aftertransformationScore: undefined,
        individualNeeds: undefined,
        serverName: undefined,
        serverCreditCode: undefined,
        projectType: "数字化改造",
        budgetType: "数字化改造",
        projectContent: undefined,
        digitalCurrentState: "<p>（简述企业在“数字化基础、数字化经营、数字化管理、数字化成效”方面现在的情况）</p>",
        expectedResults: "<p>围绕提质、增效、降本、减存、绿色、安全等方面对改造预期成效做描述）</p>",
        startDate: undefined,
        endDate: undefined,
        digitalBudgetTotal: undefined,
        otherDigitalTotal: undefined,
        generalBudget: undefined,
        digitalRenovationFunds: undefined,
        isLoan: undefined,
        loanMoney: undefined,
        authenticityCommitment: undefined,
        digitalBudgetFiles: [],
        otherBudgetFiles: [],
        digitalServiceContractFiles: [],
        digitalProjectPlanFiles: [],
        recordFormFiles: [],
        checkStatus: undefined,
        examExpert: undefined,
        creatoruserid: undefined,
        creatortime: undefined,
        lastmodifyuserid: undefined,
        lastmodifytime: undefined,
        fz_project_library_digital_budgetList: [],
        fz_project_library_other_digital_budgetList: [],
        fz_project_library_quarterly_progressList: [],
        fz_project_library_flow_taskList: [],
      },
      tableRequiredData: {},
      dataRule:
        {
          enterpriseName: [
            {
              required: true,
              message: '请输入',
              trigger: 'blur'
            },
          ],
          enterpriseCreditCode: [
            {
              required: true,
              message: '请输入',
              trigger: 'blur'
            },
          ],
          enterpriseIntroduce: [
            {
              required: true,
              message: '请输入',
              trigger: 'blur'
            },
          ],
          projectName: [
            {
              required: true,
              message: '请输入',
              trigger: 'blur'
            },
          ],
          projectLeader: [
            {
              required: true,
              message: '请输入',
              trigger: 'blur'
            },
          ],
          phone: [
            {
              required: true,
              message: '请输入',
              trigger: 'blur'
            },
            {
              pattern: /^1[3456789]\d{9}$|^0\d{2,3}-?\d{7,8}$/,
              message: '请输入正确的联系方式',
              trigger: 'blur'
            },
          ],
          industry: [
            {
              required: true,
              message: '请输入',
              trigger: 'blur'
            },
          ],
          specificIndustry: [
            {
              required: true,
              message: '请输入',
              trigger: 'blur'
            },
          ],
          county: [
            {
              required: true,
              message: '请选择',
              trigger: 'change'
            },
          ],
          digitalLelfassessmentLevel: [
            {
              required: true,
              message: '请输入',
              trigger: 'blur'
            },
          ],
          aftertransformationDigitalLevel: [
            {
              required: true,
              message: '不能为空',
              trigger: 'change'
            },
          ],
          aftertransformationScore: [
            {
              required: true,
              message: '请输入',
              trigger: ["blur", "change"]
            },
          ],
          individualNeeds: [
            {
              required: true,
              message: '请输入',
              trigger: 'blur'
            },
          ],
          serverName: [
            {
              required: true,
              message: '请输入',
              trigger: 'blur'
            },
          ],
          serverCreditCode: [
            {
              required: true,
              message: '请输入',
              trigger: 'blur'
            },
          ],
          projectType: [
            {
              required: true,
              message: '请至少选择一个',
              trigger: 'blur'
            },
          ],
          budgetType: [
            {
              required: true,
              message: '请至少选择一个',
              trigger: 'blur'
            },
          ],
          projectContent: [
            {
              required: true,
              message: '请输入',
              trigger: 'blur'
            },
          ],
          digitalCurrentState: [
            {
              required: true,
              message: '请至少选择一个',
              trigger: 'blur'
            },
          ],
          expectedResults: [
            {
              required: true,
              message: '请至少选择一个',
              trigger: 'blur'
            },
          ],
          startDate: [
            {
              required: true,
              message: '请选择',
              trigger: 'change'
            },
          ],
          endDate: [
            {
              required: true,
              message: '请选择',
              trigger: 'change'
            },
          ],
          digitalBudgetTotal: [
            {
              required: true,
              message: '请输入',
              trigger: 'blur'
            },
          ],
          otherDigitalTotal: [
            {
              required: true,
              message: '请输入',
              trigger: 'blur'
            },
          ],
          generalBudget: [
            {
              required: true,
              message: '请输入',
              trigger: 'blur'
            },
          ],
          digitalRenovationFunds: [
            {
              required: true,
              message: '请输入',
              trigger: ["blur", "change"]
            },
          ],
          isLoan: [
            {
              required: true,
              message: '不能为空',
              trigger: 'change'
            },
          ],
          authenticityCommitment: [
            {
              required: true,
              message: '请输入',
              trigger: 'blur'
            },
          ],
          digitalBudgetFiles: [
            {
              required: true,
              message: '请至少选择一个',
              trigger: 'change'
            },
          ],
          otherBudgetFiles: [
            {
              required: true,
              message: '请至少选择一个',
              trigger: 'change'
            },
          ],
          digitalServiceContractFiles: [
            {
              required: true,
              message: '请至少选择一个',
              trigger: 'change'
            },
          ],
          digitalProjectPlanFiles: [
            {
              required: true,
              message: '请至少选择一个',
              trigger: 'change'
            },
          ],
        },
      createProjectStatusOptions: [{"fullName": "项目备案", "id": "项目备案"}, {
        "fullName": "项目审核",
        "id": "项目审核"
      }, {"fullName": "进度填报", "id": "进度填报"}, {"fullName": "项目验收", "id": "项目验收"}],
      createProjectStatusProps: {"label": "fullName", "value": "id"},
      countyOptions: [{"fullName": "鼓楼区", "id": "鼓楼区"}, {"fullName": "台江区", "id": "台江区"}, {
        "fullName": "仓山区",
        "id": "仓山区"
      }, {"fullName": "马尾区", "id": "马尾区"}, {"fullName": "晋安区", "id": "晋安区"}, {
        "fullName": "长乐区",
        "id": "长乐区"
      }, {"fullName": "闽侯县", "id": "闽侯县"}, {"fullName": "连江县", "id": "连江县"}, {
        "fullName": "罗源县",
        "id": "罗源县"
      }, {"fullName": "闽清县", "id": "闽清县"}, {"fullName": "平潭县", "id": "平潭县"}, {
        "fullName": "福清市",
        "id": "福清市"
      }, {"fullName": "高新区", "id": "高新区"}],
      countyProps: {"label": "fullName", "value": "id"},
      aftertransformationDigitalLevelOptions: [{"fullName": "无等级", "id": "0"}, {
        "fullName": "一级",
        "id": "1"
      }, {"fullName": "二级", "id": "2"}, {"fullName": "三级", "id": "3"}, {"fullName": "四级", "id": "4"}],
      aftertransformationDigitalLevelProps: {"label": "fullName", "value": "id"},
      isLoanOptions: [{"fullName": "是", "id": "1"}, {"fullName": "否", "id": "0"}],
      isLoanProps: {"label": "fullName", "value": "id"},
      childIndex: -1,
      isEdit: false,
      interfaceRes: {
        createProjectStatus: [],
        enterpriseName: [],
        enterpriseCreditCode: [],
        enterpriseIntroduce: [],
        projectName: [],
        projectLeader: [],
        phone: [],
        industry: [],
        specificIndustry: [],
        county: [],
        digitalLelfassessmentLevel: [],
        digitalScore: [],
        aftertransformationDigitalLevel: [],
        aftertransformationScore: [],
        individualNeeds: [],
        serverName: [],
        serverCreditCode: [],
        projectType: [],
        budgetType: [],
        projectContent: [],
        digitalCurrentState: [],
        expectedResults: [],
        startDate: [],
        endDate: [],
        digitalBudgetTotal: [],
        otherDigitalTotal: [],
        generalBudget: [],
        digitalRenovationFunds: [],
        isLoan: [],
        loanMoney: [],
        authenticityCommitment: [],
        digitalBudgetFiles: [],
        otherBudgetFiles: [],
        digitalServiceContractFiles: [],
        digitalProjectPlanFiles: [],
        recordFormFiles: [],
        checkStatus: [],
        examExpert: [],
        creatoruserid: [],
        creatortime: [],
        lastmodifyuserid: [],
        lastmodifytime: [],
        fz_project_library_digital_budgetbudgetName: [],
        fz_project_library_digital_budgetbudgetMoney: [],
        fz_project_library_other_digital_budgetbudgetName: [],
        fz_project_library_other_digital_budgetbudgetMoney: [],
        fz_project_library_quarterly_progressprojectInseasonInvestment: [],
        fz_project_library_quarterly_progressprojectTotalInvestment: [],
        fz_project_library_quarterly_progressprojectImageProgress: [],
        fz_project_library_flow_taskstatus: [],
      },
    }
  },
  computed: {
    ...mapGetters(['userInfo'])
  },
  watch: {},
  created() {
    this.dataAll()
    this.initDefaultData()
    this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
  },
  mounted() {
  },
  methods: {
    goProgressDetail(row) {
      this.progressformVisible = true
      this.$nextTick(() => {
        this.$refs.ProgressForm.init(row.id)
      })
    },
    getEnCode(createProjectStatus) {
      const index = this.createProjectStatusOptions.findIndex(item => item.fullName === createProjectStatus);
      return index;
    },
    prev() {
      this.index--
      if (this.index === 0) {
        this.prevDis = true
      }
      this.nextDis = false
      for (let index = 0; index < this.allList.length; index++) {
        const element = this.allList[index];
        if (this.index == index) {
          this.getInfo(element.id)
        }
      }
    },
    next() {
      this.index++
      if (this.index === this.allList.length - 1) {
        this.nextDis = true
      }
      this.prevDis = false
      for (let index = 0; index < this.allList.length; index++) {
        const element = this.allList[index];
        if (this.index == index) {
          this.getInfo(element.id)
        }
      }
    },
    getInfo(id) {
      request({
        url: '/api/example/Fz_poilt_project_library/' + id,
        method: 'get'
      }).then(res => {
        this.dataInfo(res.data)
      });
    },
    changeData(model, index) {
      this.isEdit = false
      this.childIndex = index
      let modelAll = model.split("-");
      let faceMode = "";
      for (let i = 0; i < modelAll.length; i++) {
        faceMode += modelAll[i];
      }
      for (let key in this.interfaceRes) {
        if (key != faceMode) {
          let faceReList = this.interfaceRes[key]
          for (let i = 0; i < faceReList.length; i++) {
            if (faceReList[i].relationField == model) {
              let options = 'get' + key + 'Options';
              if (this[options]) {
                this[options]()
              }
              this.changeData(key, index)
            }
          }
        }
      }
    },
    changeDataFormData(type, data, model, index, defaultValue) {
      if (!this.isEdit) {
        if (type == 2) {
          for (let i = 0; i < this.dataForm[data].length; i++) {
            if (index == -1) {
              this.dataForm[data][i][model] = defaultValue
            } else if (index == i) {
              this.dataForm[data][i][model] = defaultValue
            }
          }
        } else {
          this.dataForm[data] = defaultValue
        }
      }
    },
    dataAll() {
    },
    fz_project_library_digital_budgetExist() {
      let isOk = true;
      for (let i = 0; i < this.dataForm.fz_project_library_digital_budgetList.length; i++) {
        const e = this.dataForm.fz_project_library_digital_budgetList[i];
        if (!e.budgetName) {
          this.$message({
            message: '预算名称不能为空',
            type: 'error',
            duration: 1000
          });
          isOk = false
          break
        }
        if (!e.budgetMoney) {
          this.$message({
            message: '预算金额(万元)不能为空',
            type: 'error',
            duration: 1000
          });
          isOk = false
          break
        }
      }
      return isOk;
    },
    fz_project_library_other_digital_budgetExist() {
      let isOk = true;
      for (let i = 0; i < this.dataForm.fz_project_library_other_digital_budgetList.length; i++) {
        const e = this.dataForm.fz_project_library_other_digital_budgetList[i];
      }
      return isOk;
    },
    fz_project_library_quarterly_progressExist() {
      let isOk = true;
      for (let i = 0; i < this.dataForm.fz_project_library_quarterly_progressList.length; i++) {
        const e = this.dataForm.fz_project_library_quarterly_progressList[i];
      }
      return isOk;
    },
    fz_project_library_flow_taskExist() {
      let isOk = true;
      for (let i = 0; i < this.dataForm.fz_project_library_flow_taskList.length; i++) {
        const e = this.dataForm.fz_project_library_flow_taskList[i];
      }
      return isOk;
    },
    goBack() {
      this.$emit('refresh')
    },
    clearData() {
      this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
    },
    init(id, isDetail, allList) {
      this.prevDis = false
      this.nextDis = false
      this.allList = allList || []
      if (allList.length) {
        this.index = this.allList.findIndex(item => item.id === id)
        if (this.index == 0) {
          this.prevDis = true
        }
        if (this.index == this.allList.length - 1) {
          this.nextDis = true
        }
      } else {
        this.prevDis = true
        this.nextDis = true
      }
      this.dataForm.id = id || 0;
      this.visible = true;
      this.$nextTick(() => {
        if (this.dataForm.id) {
          this.loading = true
          request({
            url: '/api/example/Fz_poilt_project_library/' + this.dataForm.id,
            method: 'get'
          }).then(res => {
            this.dataInfo(res.data)
            this.loading = false
          });
        } else {
          this.clearData()
          this.initDefaultData()
        }
      });
      this.$store.commit('generator/UPDATE_RELATION_DATA', {})
    },
    //初始化默认数据
    initDefaultData() {

    },
    // 表单提交
    dataFormSubmit(type) {
      this.dataFormSubmitType = type ? type : 0
      this.$refs['formRef'].validate((valid) => {
        if (valid) {
          if (!this.fz_project_library_digital_budgetExist()) return
          if (!this.fz_project_library_other_digital_budgetExist()) return
          if (!this.fz_project_library_quarterly_progressExist()) return
          if (!this.fz_project_library_flow_taskExist()) return
          this.request()
        }
      })
    },
    request() {
      let _data = this.dataList()
      if (this.dataFormSubmitType == 2) {
        this.continueBtnLoading = true
      } else {
        this.btnLoading = true
      }
      if (!this.dataForm.id) {
        request({
          url: '/api/example/Fz_poilt_project_library',
          method: 'post',
          data: _data
        }).then((res) => {
          this.$message({
            message: res.msg,
            type: 'success',
            duration: 1000,
            onClose: () => {
              if (this.dataFormSubmitType == 2) {
                this.$nextTick(() => {
                  this.clearData()
                  this.initDefaultData()
                })
                this.continueBtnLoading = false
                return
              }
              this.visible = false
              this.btnLoading = false
              this.$emit('refresh', true)
            }
          })
        }).catch(() => {
          this.btnLoading = false
          this.continueBtnLoading = false
        })
      } else {
        request({
          url: '/api/example/Fz_poilt_project_library/' + this.dataForm.id,
          method: 'PUT',
          data: _data
        }).then((res) => {
          this.$message({
            message: res.msg,
            type: 'success',
            duration: 1000,
            onClose: () => {
              if (this.dataFormSubmitType == 2) return this.continueBtnLoading = false
              this.visible = false
              this.btnLoading = false
              this.$emit('refresh', true)
            }
          })
        }).catch(() => {
          this.btnLoading = false
          this.continueBtnLoading = false
        })
      }
    },
    addfz_project_library_digital_budgetList() {
      let item = {
        budgetName: undefined,
        budgetMoney: 0,
      }
      this.getfz_project_library_digital_budgetList(item)
    },
    delfz_project_library_digital_budgetList(index) {
      this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
        type: 'warning'
      }).then(() => {
        this.dataForm.fz_project_library_digital_budgetList.splice(index, 1);
      }).catch(() => {
      });
    },
    getfz_project_library_digital_budgetList(value) {
      let item = {...this.tableRows.fz_project_library_digital_budgetList, ...value}
      this.dataForm.fz_project_library_digital_budgetList.push(item)
      this.childIndex = this.dataForm.fz_project_library_digital_budgetList.length - 1
      this.isEdit = true
      this.isEdit = false
      this.childIndex = -1
    },
    addfz_project_library_other_digital_budgetList() {
      let item = {
        budgetName: undefined,
        budgetMoney: 0,
      }
      this.getfz_project_library_other_digital_budgetList(item)
    },
    delfz_project_library_other_digital_budgetList(index) {
      this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
        type: 'warning'
      }).then(() => {
        this.dataForm.fz_project_library_other_digital_budgetList.splice(index, 1);
      }).catch(() => {
      });
    },
    getfz_project_library_other_digital_budgetList(value) {
      let item = {...this.tableRows.fz_project_library_other_digital_budgetList, ...value}
      this.dataForm.fz_project_library_other_digital_budgetList.push(item)
      this.childIndex = this.dataForm.fz_project_library_other_digital_budgetList.length - 1
      this.isEdit = true
      this.isEdit = false
      this.childIndex = -1
    },
    addfz_project_library_quarterly_progressList() {
      let item = {
        projectInseasonInvestment: undefined,
        projectTotalInvestment: undefined,
        projectImageProgress: undefined,
      }
      this.getfz_project_library_quarterly_progressList(item)
    },
    delfz_project_library_quarterly_progressList(index) {
      this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
        type: 'warning'
      }).then(() => {
        this.dataForm.fz_project_library_quarterly_progressList.splice(index, 1);
      }).catch(() => {
      });
    },
    getfz_project_library_quarterly_progressList(value) {
      let item = {...this.tableRows.fz_project_library_quarterly_progressList, ...value}
      this.dataForm.fz_project_library_quarterly_progressList.push(item)
      this.childIndex = this.dataForm.fz_project_library_quarterly_progressList.length - 1
      this.isEdit = true
      this.isEdit = false
      this.childIndex = -1
    },
    addfz_project_library_flow_taskList() {
      let item = {
        status: undefined,
      }
      this.getfz_project_library_flow_taskList(item)
    },
    delfz_project_library_flow_taskList(index) {
      this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
        type: 'warning'
      }).then(() => {
        this.dataForm.fz_project_library_flow_taskList.splice(index, 1);
      }).catch(() => {
      });
    },
    getfz_project_library_flow_taskList(value) {
      let item = {...this.tableRows.fz_project_library_flow_taskList, ...value}
      this.dataForm.fz_project_library_flow_taskList.push(item)
      this.childIndex = this.dataForm.fz_project_library_flow_taskList.length - 1
      this.isEdit = true
      this.isEdit = false
      this.childIndex = -1
    },
    openSelectDialog(key) {
      this.currTableConf = this.addTableConf[key]
      this.currVmodel = key
      this.selectDialogVisible = true
      this.$nextTick(() => {
        this.$refs.selectDialog.init()
      })
    },
    addForSelect(data) {
      for (let i = 0; i < data.length; i++) {
        let t = data[i]
        if (this['get' + this.currVmodel]) {
          this['get' + this.currVmodel](t)
        }
      }
    },
    dateTime(timeRule, timeType, timeTarget, timeValueData, dataValue) {
      let timeDataValue = null;
      let timeValue = Number(timeValueData)
      if (timeRule) {
        if (timeType == 1) {
          timeDataValue = timeValue
        } else if (timeType == 2) {
          timeDataValue = dataValue
        } else if (timeType == 3) {
          timeDataValue = new Date().getTime()
        } else if (timeType == 4) {
          let previousDate = '';
          if (timeTarget == 1 || timeTarget == 2) {
            previousDate = getDateDay(timeTarget, timeType, timeValue)
            timeDataValue = new Date(previousDate).getTime()
          } else if (timeTarget == 3) {
            previousDate = getBeforeData(timeValue)
            timeDataValue = new Date(previousDate).getTime()
          } else {
            timeDataValue = getBeforeTime(timeTarget, timeValue).getTime()
          }
        } else if (timeType == 5) {
          let previousDate = '';
          if (timeTarget == 1 || timeTarget == 2) {
            previousDate = getDateDay(timeTarget, timeType, timeValue)
            timeDataValue = new Date(previousDate).getTime()
          } else if (timeTarget == 3) {
            previousDate = getLaterData(timeValue)
            timeDataValue = new Date(previousDate).getTime()
          } else {
            timeDataValue = getLaterTime(timeTarget, timeValue).getTime()
          }
        }
      }
      return timeDataValue;
    },
    time(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
      let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType
      let timeDataValue = null
      if (timeRule) {
        if (timeType == 1) {
          timeDataValue = timeValue || '00:00:00'
          if (timeDataValue.split(':').length == 3) {
            timeDataValue = timeDataValue
          } else {
            timeDataValue = timeDataValue + ':00'
          }
        } else if (timeType == 2) {
          timeDataValue = dataValue
        } else if (timeType == 3) {
          timeDataValue = this.jnpf.toDate(new Date(), format)
        } else if (timeType == 4) {
          let previousDate = '';
          previousDate = getBeforeTime(timeTarget, timeValue)
          timeDataValue = this.jnpf.toDate(previousDate, format)
        } else if (timeType == 5) {
          let previousDate = '';
          previousDate = getLaterTime(timeTarget, timeValue)
          timeDataValue = this.jnpf.toDate(previousDate, format)
        }
      }
      return timeDataValue;
    },
    dataList() {
      var _data = this.dataForm;
      return _data;
    },
    dataInfo(dataAll) {
      let _dataAll = dataAll
      this.dataForm = _dataAll
      this.isEdit = true
      this.dataAll()
      for (let i = 0; i < _dataAll.fz_project_library_digital_budgetList.length; i++) {
        this.childIndex = i
      }
      for (let i = 0; i < _dataAll.fz_project_library_other_digital_budgetList.length; i++) {
        this.childIndex = i
      }
      for (let i = 0; i < _dataAll.fz_project_library_quarterly_progressList.length; i++) {
        this.childIndex = i
      }
      for (let i = 0; i < _dataAll.fz_project_library_flow_taskList.length; i++) {
        this.childIndex = i
      }
      this.childIndex = -1
    },
  },
}

</script>
<style lang="scss" scoped>
::v-deep .is-disabled .el-input__inner,
::v-deep .is-disabled .el-radio__label,
::v-deep .is-disabled .el-radio__input,
::v-deep .is-disabled .el-checkbox__input,
::v-deep .is-disabled .el-checkbox__label {
  background-color: #ffffff !important;
  cursor: not-allowed !important;
  color: #606266 !important;
}

::v-deep .is-disabled .is-checked .el-checkbox__inner {
  border-color: #DCDFE6;
  background-color: #1890ff !important;
}

.el-steps--horizontal {
  display: flex;
  justify-content: center;
}

.groupTitle {
  font-size: 17px;
  color: #1684FC;
}

::v-deep .ql-toolbar.ql-snow {
   padding:0px;

  .ql-formats {
    display: none;
  }
}
</style>
